home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / madtrb31.arc / SCROLL.PAS < prev    next >
Pascal/Delphi Source File  |  1985-05-15  |  768b  |  23 lines

  1. Procedure Scroll (First_Row,Last_Row,First_Column,Last_Column,
  2.   Lines_To_Scroll: Integer);
  3. {Scroll scrolls the indicated region of the screen.  If Lines_To_Scroll
  4.  is positive the screen scrolls up, if negative it scrolls down, if 0 the
  5.  entire region is blanked.
  6.  Written by Albert Bailey.}
  7. Type
  8.   RegPack=record
  9.     Ax,Bx,Cx,Dx,Bp,Si,Di,Ds,Es,Flags: Integer;
  10.   End;
  11. Var
  12.   Reg1: Regpack;
  13. Begin
  14.   Reg1.Cx:=(First_Row Shl 8) Or First_Column;
  15.   Reg1.Dx:=(Last_Row Shl 8) Or Last_Column;
  16.   Reg1.Bx:=0;
  17.   If (Lines_To_Scroll >= 0) Then
  18.     Reg1.Ax:=$0600 Or Lines_To_Scroll
  19.   Else
  20.     Reg1.Ax:=$0700 Or Abs(Lines_To_Scroll);
  21.   Intr($10,Reg1);
  22. End;
  23.